package jin.competition.jan11;

public class User {
	// =============用户==========
	private int userId;// 唯一
	private String userName;
	private String userPassword;
	private String userEmail;

	public int getUserId() {
		return userId;
	}

	public void setUserId(int userId) {
		this.userId = userId;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getUserPassword() {
		return userPassword;
	}

	public void setUserPassword(String userPassword) {
		this.userPassword = userPassword;
	}

	public String getUserEmail() {
		return userEmail;
	}

	public void setUserEmail(String userEmail) {
		this.userEmail = userEmail;
	}
	// =========管理员================

	private int adminId;
	private String adminName;
	private String adminPassword;
	private String adminEmail;

	public int getAdminId() {
		return adminId;
	}

	public void setAdminId(int adminId) {
		this.adminId = adminId;
	}

	public String getAdminName() {
		return adminName;
	}

	public void setAdminName(String adminName) {
		this.adminName = adminName;
	}

	public String getAdminPassword() {
		return adminPassword;
	}

	public void setAdminPassword(String adminPassword) {
		this.adminPassword = adminPassword;
	}

	public String getAdminEmail() {
		return adminEmail;
	}

	public void setAdminEmail(String adminEmail) {
		this.adminEmail = adminEmail;
	}

//	public void printUserList(User a) {
//		System.out.println("-Id-" + "\t" + "-Name-" + "\t" + "-Password-" + "\t" + "-Email-");
//		System.out
//				.println(a.getUserId() + "\t" + a.getUserName() + "\t" + a.getUserPassword() + "\t" + a.getUserEmail());
//
//	}

	public void selectU(User uu) {// 管理员查询 用户整条记录
		System.out.println("管理员查询" + "用户id为" + uu.userId + "  " + uu.userName + "的结果：");
		System.out.println("-Id-" + "\t" + "-Name-" + "\t" + "-Password-" + "\t" + "-Email-");
		System.out.println(uu.userId + "\t" + uu.userName + "\t" + uu.userPassword + "\t" + uu.userEmail);

	}

	public void insertU(int id, String name, String password, String email) {// 管理员增加   用户整条记录
																				
		User uu = new User();
		uu.userId = id;
		uu.userName = name;
		uu.userPassword = password;
		uu.userEmail = email;
	}
	public void updateU(User uu,String name, String password, String email){//管理员修改 用户整条记录
		uu.userName = name;
		uu.userPassword = password;
		uu.userEmail = email;
	}
	public void deleteU(User uu){
		uu.userId = -1;//这里 id设为-1代表删除
		uu.userName = null;
		uu.userPassword = null;
		uu.userEmail = null;
	}

	// insert
	// delete
	// update
	// select

}

// 1. 实现后台管理员操作的后台功能， 后台管理员，需要对整个系统的用户，进行，增，删，改，查， 的操作。